package com.explore.demo.controller;

import com.explore.demo.VO.MailInfoVO;
import com.explore.demo.common.ServerResponse;
import com.explore.demo.service.MailSendService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * 发送邮件的controller
 * @author le
 */
@RestController
@RequestMapping("/mail")
@Api("实现邮件功能的控制层")
public class MailController
{

    @Resource
    private MailSendService mailSendService;

    @PostMapping("/simple")
    @ApiOperation("发送简单邮件的接口")
    public ServerResponse sendSimpleMail(MailInfoVO mailInfoVO){
        return mailSendService.sendSimpleMail(mailInfoVO);
    }

}
